<!DOCTYPE html>
<html>
<head>
    <!-- 页面meta -->
    <meta charset="utf-8">
    <title>软件体系结构实验——基于SSM的电影推荐系统 案例</title>
    <!-- 引入样式 -->
    <link rel="stylesheet" href="../plugins/elementui/index.css">
    <link rel="stylesheet" href="../plugins/font-awesome/css/font-awesome.min.css">
    <link rel="stylesheet" href="../css/style.css">
</head>

<body class="hold-transition">
<div id="app">
    <div class="content-header">
        <center><h1 style="color: #f56c6c">软件体系结构实验演示——基于SSM的电影推荐
            系统</h1></center>

        <br>
        <h1>电影管理</h1>
    </div>

    <div class="box">
        <div class="filter-container">
            <el-form ref="dataAddForm" :model="formData" :rules="rules" labelposition="right" label-width="100px">

                <el-row>
                    <el-col :span="5">
                        <el-form-item label="租赁用户id" prop="custormer_id">
                            <el-input v-model="formData.custormer_id"/>
                        </el-form-item>
                    </el-col>
                    <el-col :span="5">
                        <el-button type="primary" class="butT"
                                   @click="getSimilarFilms()">查询某一用户的推荐电影列表
                        </el-button>

                    </el-col>
                </el-row>
            </el-form>

        </div>
    </div>

    <div class="box">


        <table style="width: 100%">
            <tr>
                <td style="width: 1%; height: 300px; background-color: #AFDCEC">
                </td>
                <td style="width: 49%; height: 300px; background-color: #AFDCEC">
                    <p>
                    <h2>&nbsp;&nbsp; Hello,Jiangwei,这里是你的页面正文。</br>
                        将来同学们在这里显示主要业务逻辑模块，右边是显示登录后根据你的ID显示
                        的推荐列表。
                        其中在上面的查询框了舒服一个custormid,模拟登录，然后右边显示推荐列
                        表。 </h2>

                    </p>

                </td>
                <td style="width: 50%; height: 300px;background-color: #E5E4E2">
                    <div>
                        <el-table size="small" current-row-key="id"
                                  :data="dataList" stripe highlight-current-row>

                            <el-table-column type="index" align="center" label="序
号"></el-table-column>

                            <el-table-column prop="release_year" label="发行年份"
                                             align="center"></el-table-column>
                            5
                            <el-table-column prop="title" label="电影名称"
                                             align="center"></el-table-column>

                            <el-table-column prop="description" label="简介"
                                             align="center"></el-table-column>

                            <el-table-column label="操作" align="center">
                                <template slot-scope="scope">
                                    -button size="mini" type="danger"> X -删除
                                    l-button>

                                </template>
                            </el-table-column>
                        </el-table>

                        <div class="pagination-container">
                            <el-pagination
                                    class="pagiantion"
                                    @current-change="handleCurrentChange"
                                    :current-page="pagination.currentPage"
                                    :page-size="pagination.pageSize"
                                    layout="total, prev, pager, next, jumper"
                                    :total="pagination.total">
                            </el-pagination>
                        </div>

                    </div>

                </td>
            </tr>
        </table>
    </div>

</div>
</body>

<!-- 引入组件库 -->
<script src="../js/vue.js"></script>
<script src="../plugins/elementui/index.js"></script>
<script type="text/javascript" src="../js/jquery.min.js"></script>
<script src="../js/axios-0.18.0.js"></script>
<script>
    var vue = new Vue({
        el: '#app',
        data: {
            dataList: [],//当前页要展示的分页列表数据
            formData: {},//查询某一个租赁用户的id
            dialogFormVisible: false,//增加表单是否可见
            dialogFormVisible4Edit: false,//编辑表单是否可见
            pagination: {},//分页模型数据，暂时弃用
        },

        //钩子函数，VUE对象初始化完成后自动执行
        created() {
            //this.getSimilarFilms();
        },

        methods: {
            // 重置表单
            resetForm() {
                //清空输入框
                this.formData = {};
            },

            //提交的是POST请求
            getSimilarFilms() {
                // alert(this.formData.custormer_id);
                axios.post("/recomFilms", this.formData).then((res) => {
                    this.dataList = res.data; //把返回的数据和页面的数据绑定在一起了
                });
            },


        }
    })
</script>
</html>
